package com.barbarosso.utils.loader {
	import com.barbarosso.utils.array.ArrayCollection;
	
	/**
	 * @author barbarosso
	 */
	public class AssetQueCollection extends ArrayCollection {
		  private var _id:String; //  id
               
                /**
                 * Constructor 
                 */
                public function AssetQueCollection(p_id : String ):void
                {
                        super();
                        _id = p_id;
                }
                
                /**
                 * toString
                 */
                override public function toString(): String {
                        return id + ': ' + length;
                }
                
                /**
                 * getAsset
                 */
                public function getAssetById(id:String) : AssetCollection {
					return getItemByChildProperty('id',id) as AssetCollection;
                }

                /**
                 * getAssetByIndex
                 */
                public function getAssetByIndex( index : int) : AssetCollection {
					return getItemByIndex(index) as AssetCollection;
                }
                
                /**
                 * Read only property
                 */
                public function get id():String {
						return _id;
				}
		
	}
}
